/* LiberTool 通用样式 */

/* 编辑器容器通用样式 */
.editor-container {
  display: flex;
  height: calc(100vh - 250px);
  min-height: 400px;
}

.editor-panel, .preview-panel {
  flex: 1;
  overflow: auto;
  border: 1px solid var(--bs-border-color);
  border-radius: 0.375rem;
}

.editor-panel {
  margin-right: 10px;
}

/* 代码和预览区域通用样式 */
pre {
  background-color: var(--bs-tertiary-bg);
  border-radius: 0.375rem;
  padding: 1rem;
  overflow: auto;
}

code {
  font-family: Consolas, Monaco, 'Andale Mono', monospace;
  font-size: 0.875em;
}

/* 工具栏通用样式 */
.toolbar {
  margin-bottom: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.toolbar button {
  padding: 0.25rem 0.5rem;
}

.toolbar-group {
  margin-right: 10px;
  display: flex;
  gap: 5px;
}

/* 错误提示样式 */
.dify-error-alert {
  padding: 12px;
  display: flex;
  align-items: center;
  gap: 12px;
  color: white;
}

.error-details h6 {
  margin-bottom: 4px;
  font-weight: 600;
}

.btn-retry {
  margin-top: 8px;
  padding: 6px 12px;
  background: rgba(255,255,255,0.15);
  border-radius: 4px;
  transition: all 0.3s ease;
}

.btn-retry:hover {
  background: rgba(255,255,255,0.25);
}

.loading-spinner {
  padding: 12px;
  display: flex;
  gap: 8px;
  align-items: center;
}

/* 响应式布局通用样式 */
@media (max-width: 768px) {
  .editor-container {
    flex-direction: column;
    height: auto;
  }
  
  .editor-panel, .preview-panel {
    height: 400px;
    margin-right: 0;
  }
  
  .editor-panel {
    margin-bottom: 10px;
  }
}

/* 图标样式 */
.feather-copy, .feather-pause, .search-icon {
  width: 16px;
  height: 16px;
}

/* 返回按钮图标样式 */
.btn-back-icon {
  width: 16px;
  height: 16px;
  margin-right: 0.25rem;
}

/* 搜索容器样式 */
.search-container {
  position: relative;
}

.search-icon {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--bs-secondary);
}

/* 提示信息图标样式 */
.alert i[data-feather="info"] {
  width: 16px;
  height: 16px;
  margin-right: 5px;
  vertical-align: text-bottom;
}

/* 视频图标样式 */
.card-title i[data-feather="video"] {
  width: 18px;
  height: 18px;
  margin-right: 5px;
  vertical-align: text-bottom;
}

/* 搜索按钮图标样式 */
button i[data-feather="search"] {
  width: 16px;
  height: 16px;
  margin-right: 3px;
}

/* 隐藏元素 */
.hidden {
  display: none;
}

/* 大型搜索图标 */
.search-icon-large {
  width: 48px;
  height: 48px;
  opacity: 0.5;
}

/* 预览容器 */
.preview-container {
  background-color: #f8f9fa;
}

/* 图片预览 */
.img-preview {
  max-height: 100px;
}

/* 无边距标题和列表 */
.no-margin {
  margin: 0;
}

/* 弹性布局容器 */
.flex-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}